home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
CRS
/
crs07.d81
/
tbasic.arc
/
TB
/
CENTRE
(
.txt
)
next >
Wrap
Commodore BASIC
|
2009-10-10
|
1KB
|
43 lines
0 REM CENTRE (SEPT 4/84) :
1 :
2 REM 1 STATEMENTS, 0 FUNCTIONS
3 :
4 REM KEYWORD CHARACTERS: 6
5 :
6 REM KEYWORD ROUTINE LINE SER #
7 REM CENTRE CNTR 4144 049
8 :
9 REM ===============================
10 :
112 .ASC "CENTR[197]"
1112 .WORD CNTR-1
4144 CNTR JSR $AD9E ;EVAL STRING
4146 JSR $B6A3 ;MAKE DESCRIPTOR
4148 TAY ;INDEX FROM STR END
4150 PHA ;PUSH STR LENGTH
4152 LDX #0 ;# PRINTABLE CHAR
4154 CE1 DEY ;BACKUP INDEX
4156 CPY #$FF ;TEST DONE
4158 BEQ CE2 ;YES
4160 LDA ($22),Y ;GET A CHAR
4162 AND #$7F ;CLEAR HIGH BIT
4164 CMP #$20 ;TEST CTRL CHAR
4166 BCC CE1 ;YES
4168 INX ;BUMP COUNTER
4170 BNE CE1 ;BRANCH ALWAYS
4172 CE2 TXA ;TEST COUNTER<=40
4174 SEC
4176 SBC #$29
4178 BCS CE4 ;NO
4180 EOR #$FF ;NEGATE AND HALVE
4182 LSR ;RESULT
4183 LDX $D3 ;TEST LOGICAL LINE
4184 CPX #$28 ;40 OR 80
4185 BCC CE3 ;40
4186 ADC #$27 ;ADD 40(CARRY SET)
4187 CE3 STA $D3 ;SET CURSOR HORIZ
4188 PLA ;PULL STRING LENGTH
4189 JMP $AB24 ;PRINT STRING
4190 CE4 JMP $A571
4192 ;